package com.zero.dubbo.dao;

import com.zero.dubbo.model.User;

import javax.validation.ConstraintViolationException;
import javax.validation.constraints.NotNull;


public interface IUserRpcService {

    /**
     * 根据Id获取User
     * @param id
     * @return
     */
    User get(@NotNull(message = "用户编号不能为空") Integer id) throws ConstraintViolationException;


    /**
     * add用户
     * @param user
     * @return
     * @throws ConstraintViolationException
     */
    Integer add(User user) throws ConstraintViolationException;
}
